package com.mangix;

import com.lexicalscope.jewel.cli.ArgumentValidationException;
import com.lexicalscope.jewel.cli.CliFactory;
import com.lexicalscope.jewel.cli.Option;

/**
 * Created by Ahan on 2014/5/12.
 */
public class Mangix {

    public interface CommandLineOptions {
        @Option(shortName = "n", defaultValue = "")
        String strKnownNode();

        @Option(shortName = "m", defaultValue = "")
        String strMonitor();

        @Option(shortName = "o", defaultValue = "")
        String strObservation();
    }

    public static void main(String[] args) {
        try {
            CommandLineOptions cli = CliFactory.parseArguments(CommandLineOptions.class, args);
            MangixBuilder.run(cli.strKnownNode(), cli.strMonitor(), cli.strObservation());
        }
        catch(ArgumentValidationException e) {
            System.out.println("Usage: mangix [-n knownNode] [-m monitor] [-o observation]");
        }
    }
}
